import os
from pathlib import Path

# Database configuration
DB_CONFIG = {
    'URI': 'mysql+pymysql://root:123456@192.168.202.128:3306/demo',
    'TRACK_MODIFICATIONS': False
}

# MinIO configuration
MINIO_CONFIG = {
    'endpoint': '81.70.215.246:40005',
    'access_key': 'l5kYLNqIBaZIIvrN86yy',
    'secret_key': 'tQLkH5IVv33MGMga40hwumdr5o3jp5LO2YKp0LqB',
    'secure': False,
    'bucket_name': 'documents'
}

# ChromaDB configuration
CHROMA_CONFIG = {
    'path': './chroma_db',
    'collection_name': 'document_segments'
}

# Ollama 配置
OLLAMA_BASE_URL = "http://localhost:11434"

OLLAMA_CONFIG = {
    'base_url': 'http://localhost:11434',  # Ollama服务地址
    'default_model': 'bge-m3:latest',  # 默认嵌入模型
}

# Embedding model configuration
# EMBEDDING_MODEL = 'all-MiniLM-L6-v2'
EMBEDDING_MODEL = "bge-m3:latest"
MODEL_NAME = "qwen2.5:3b"

# 上传文件配置
UPLOAD_FOLDER = "uploads"
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'doc', 'docx'}

# 指标查询Agent配置
INDICATORS_COLLECTION = 'indicators'
DIMENSIONS_COLLECTION = 'dimensions'

# MDR指标服务配置
# http://192.168.77.131:40002/mdrbase-api/prod/rpt-arc/api
MDR_CONFIG = {
    'base_url': 'http://114.242.246.245:18095/mdrbase-api/prod/rpt-arc/api',
}

VN_CONNECT_DB_TYPE = 'iris'

# Vanna 连接 mysql 配置
VN_MYSQL_CONFIG = {
    'host': '192.168.202.128',
    'dbname': 'demo',
    'user': 'root',
    'password': '123456',
    'port': 3306
}

VN_IRIS_CONFIG = {
    'host': '114.242.246.227',
    'dbname': 'mdr',
    'user': '_system',
    'password': 'MDR@iris',
    'port': 51773
}